#include "PreIdentifiedObject.h"

/** \brief Konstruktor domyślny

  Konstruktor ustawiający prostą inercję.
  B = 0.5; A = [1 -0.5]; delay = 1;
  */
namespace Jano
{
PreIdentifiedObject::PreIdentifiedObject():m_polyA(1, 1),m_polyB()
{
    m_polyA[0] = 1;
    m_polyA[1] = -0.5;

    m_polyB[0] = 0.5;

    m_delay = 1;
}


PreIdentifiedObject::PreIdentifiedObject(RafMat::SimEngine::Polynomial &polyA, RafMat::SimEngine::Polynomial &polyB, unsigned int delay)
{
    m_polyA = polyA;
    m_polyB = polyB;
    m_delay = delay;
}


void PreIdentifiedObject::setPolyA(RafMat::SimEngine::Polynomial &polyA)
{
    m_polyA = polyA;
}


RafMat::SimEngine::Polynomial PreIdentifiedObject::getPolyA()
{
    return m_polyA;
}


unsigned int PreIdentifiedObject::getDegreeA()
{
    return m_polyA.degree();
}


void PreIdentifiedObject::setPolyB(RafMat::SimEngine::Polynomial &polyB)
{
    m_polyB = polyB;
}


RafMat::SimEngine::Polynomial PreIdentifiedObject::getPolyB()
{
    return m_polyB;
}


unsigned int PreIdentifiedObject::getDegreeB()
{
    return m_polyB.degree();
}


void PreIdentifiedObject::setDelay(unsigned int delay)
{
    m_delay = delay;
}

unsigned int PreIdentifiedObject::getDelay()
{
    return m_delay;
}

} // namespace Jano
